\hypertarget{classUDPReceiver}{
\section{UDPReceiver Class Reference}
\label{classUDPReceiver}\index{UDPReceiver@{UDPReceiver}}
}
Inheritance diagram for UDPReceiver::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classUDPReceiver}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual size\_\-t \hyperlink{classUDPReceiver_31b23df95675505ee2333e2674e2e13a}{receive} (char $\ast$, size\_\-t)=0
\begin{CompactList}\small\item\em Accepts data over UDP. \item\end{CompactList}\item 
virtual size\_\-t \hyperlink{classUDPReceiver_6b889964bfdbeee54eca03c28a970968}{receive} (size\_\-t \&)=0
\begin{CompactList}\small\item\em Accepts a size\_\-t variable over UDP. \item\end{CompactList}\item 
{\footnotesize template$<$typename Serializable$>$ }\\\hyperlink{classUDPReceiver}{UDPReceiver} \& \hyperlink{classUDPReceiver_11327e719ed6cf835bf4fcbb82d9ca14}{operator$>$$>$} (Serializable \&obj)
\begin{CompactList}\small\item\em Receive a Serializable object from UDP using boost serialization. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Attributes}
\begin{CompactItemize}
\item 
\hypertarget{classUDPReceiver_72efa3dead1af09c9d1a715931079190}{
static const size\_\-t \hyperlink{classUDPReceiver_72efa3dead1af09c9d1a715931079190}{MAX\_\-BUF\_\-LEN} = 65536}
\label{classUDPReceiver_72efa3dead1af09c9d1a715931079190}

\begin{CompactList}\small\item\em Maximum receive buffer length. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
\hyperlink{classUDPReceiver}{UDPReceiver}

Abstract class that defines common methods and attributes for receivng data over UDP. Inheriting classes must implement \hyperlink{classUDPReceiver_31b23df95675505ee2333e2674e2e13a}{receive()} methods. 

\subsection{Member Function Documentation}
\hypertarget{classUDPReceiver_31b23df95675505ee2333e2674e2e13a}{
\index{UDPReceiver@{UDPReceiver}!receive@{receive}}
\index{receive@{receive}!UDPReceiver@{UDPReceiver}}
\subsubsection[receive]{\setlength{\rightskip}{0pt plus 5cm}virtual size\_\-t UDPReceiver::receive (char $\ast$, \/  size\_\-t)\hspace{0.3cm}{\tt  \mbox{[}pure virtual\mbox{]}}}}
\label{classUDPReceiver_31b23df95675505ee2333e2674e2e13a}


Accepts data over UDP. 

This class method uses provided buffer to save data, and should return the number of bytes read. 

Implemented in \hyperlink{classUDPClient_4719ca9fe37b62704d7ed8087eaf0d0c}{UDPClient}, \hyperlink{classUDPSenderReceiver_c4be359228c97971be27fad0392c49b0}{UDPSenderReceiver}, and \hyperlink{classUDPServer_f419ea70dd008197494f4d023444e8fd}{UDPServer}.\hypertarget{classUDPReceiver_6b889964bfdbeee54eca03c28a970968}{
\index{UDPReceiver@{UDPReceiver}!receive@{receive}}
\index{receive@{receive}!UDPReceiver@{UDPReceiver}}
\subsubsection[receive]{\setlength{\rightskip}{0pt plus 5cm}virtual size\_\-t UDPReceiver::receive (size\_\-t \&)\hspace{0.3cm}{\tt  \mbox{[}pure virtual\mbox{]}}}}
\label{classUDPReceiver_6b889964bfdbeee54eca03c28a970968}


Accepts a size\_\-t variable over UDP. 

Useful if you are waiting for an item larger than 1024 bytes, so you can be warned that more than one packet is incoming. 

Implemented in \hyperlink{classUDPClient_5f104c5f992b3e6186cd1bfd86f22f8a}{UDPClient}, \hyperlink{classUDPSenderReceiver_0bf1277afc02d7824af00b55bdadc448}{UDPSenderReceiver}, and \hyperlink{classUDPServer_836343729c91b3ba5fe248b08ee3619c}{UDPServer}.\hypertarget{classUDPReceiver_11327e719ed6cf835bf4fcbb82d9ca14}{
\index{UDPReceiver@{UDPReceiver}!operator$>$$>$@{operator$>$$>$}}
\index{operator$>$$>$@{operator$>$$>$}!UDPReceiver@{UDPReceiver}}
\subsubsection[operator$>$$>$]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Serializable$>$ {\bf UDPReceiver}\& UDPReceiver::operator$>$$>$ (Serializable \& {\em obj})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPReceiver_11327e719ed6cf835bf4fcbb82d9ca14}


Receive a Serializable object from UDP using boost serialization. 

Mind that it is necessary to call resolve() on Client (or bind() on Server) before using operator $>$$>$.

\begin{Desc}
\item[Note:]An object is serializable if it has a serialize() private method. See boost::serialize documentation.\end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em obj}]the Object which will receive unserialization data. \end{description}
\end{Desc}


Reimplemented in \hyperlink{classUDPSenderReceiver_888e5b61c422a22df4b615340bd9a126}{UDPSenderReceiver}, and \hyperlink{classUDPServer_1_1Responder_6841d82ebbd1361ab9d95f3866af9694}{UDPServer::Responder}.

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
\hyperlink{udpinterface_8cpp}{udpinterface.cpp}\end{CompactItemize}
